package com.qf.dubbo.service.impl;

import com.qf.dubbo.service.DeviceService;
import org.apache.dubbo.config.annotation.Service; //注入到注册中心，同时注入到spring容器中


//@Service//注入到注册中心，同时注入到spring容器中
@Service(timeout = 3000)
public class DeviceServiceImpl implements DeviceService {
    @Override
    public String showDevice(Integer id) {
        System.out.println("produce的DeviceServiceImpl中showDevice方法被触发");
        try {
            Thread.sleep(2500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "device----"+id;
    }
}
